﻿<UserControl x:Class="FIFP.DashBoard.Views.Settings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    DataContext="{Binding ImportVM,Source={StaticResource ServiceLocator}}"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    d:DesignWidth="1200" d:DesignHeight="1700">

    <Grid x:Name="LayoutRoot">
        <!--<Viewbox Margin="0" VerticalAlignment="Top" Width="750">-->
        <Border MinWidth="1500" BorderBrush="{StaticResource PopupBorder}" BorderThickness="1" Margin="0" CornerRadius="2" Background="#FF3D3D3D" VerticalAlignment="Top" Width="1000" >
            <Grid Margin="0" Background="#FF2C303C">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border Margin="0" CornerRadius="2,2,0,0" Background="#FF656565">
                    <Grid Margin="5,10" VerticalAlignment="Center">
                        <TextBlock HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="Settings" Style="{StaticResource PopupContentHead}" VerticalAlignment="Center"/>
                        <TextBlock HorizontalAlignment="Right" Margin="5,0,35,0" TextWrapping="NoWrap" Text="{Binding SelectedChartType}" Style="{StaticResource PopupContentHead}"/>
                        <Button Name="CloseBtn" Grid.Column="1" Cursor="Hand" HorizontalAlignment="Right" Height="17" IsTabStop="False" Style="{StaticResource CloseButtonStyle}" VerticalAlignment="Center" Width="18" Margin="0,0,0,2">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <i:InvokeCommandAction Command="{Binding SettingsCancelCommand}" CommandParameter="{Binding ElementName=CloseBtn}" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                    </Grid>
                </Border>

                <Grid Margin="0" Grid.Row="1" VerticalAlignment="Bottom" Background="#FF2C303C">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <Grid x:Name="grid" Grid.Row="1" RenderTransformOrigin="0.5,0.5">
                        <Grid.RenderTransform>
                            <CompositeTransform/>
                        </Grid.RenderTransform>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <Border BorderThickness="0" BorderBrush="{StaticResource PopupBorder}" Margin="0,0,0,25">
                            <Grid Margin="0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="0.60*"></ColumnDefinition>
                                    <ColumnDefinition Width="0.40*"></ColumnDefinition>
                                    <!--<ColumnDefinition Width="0.30*"></ColumnDefinition>-->
                                </Grid.ColumnDefinitions>

                                <Grid Margin="10,15,10,0" Grid.Row="0" Grid.Column="0" Visibility="Collapsed">
                                    <StackPanel Orientation="Vertical" Margin="0" VerticalAlignment="Top">
                                        <TextBlock Margin="0" Grid.Column="1" TextWrapping="Wrap" Text="Data Upload" TextDecorations="Underline" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource ContentStyle}"/>
                                        <TextBlock Margin="0,50,0,5" Grid.Column="1" TextWrapping="Wrap" Text="Reservoir Capacity" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>
                                        <Button Name="btnUpload" Cursor="Hand" Command="{Binding Path=DataUploadCommand}" CommandParameter="{Binding ElementName=btnUpload}" Content="Upload" Margin="0,0,30,0" Width="120" Height="28" Style="{StaticResource OverlapButtonStyle}" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left" />
                                    </StackPanel>

                                </Grid>
                                <Grid Margin="10,15,10,0" Grid.Row="0" Grid.Column="0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="*"></RowDefinition>
                                    </Grid.RowDefinitions>

                                    <Grid Margin="0">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="*"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Margin="0" Grid.ColumnSpan="4" TextWrapping="Wrap" Text="Parameter Settings" TextDecorations="Underline" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource ContentStyle}"/>
                                        <TextBlock Margin="0,35,0,5" Grid.ColumnSpan="4" TextWrapping="Wrap" Grid.Row="1" Text="Capacity" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>


                                        <Border BorderThickness="0" Grid.Row="2" Grid.Column="0" Margin="0,0,0,0" Background="#FF965e67" >
                                            <TextBlock Text="Unit Type" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Grid.Row="2" Grid.Column="1" Margin="5,0,5,0" Background="#FF965e67">
                                            <TextBlock Text="Unit Name" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Margin="0,0,0,0" Background="#FF965e67" Grid.Row="2" Grid.Column="2">
                                            <TextBlock Text="Current Capacity" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Margin="5,0,0,0" Background="#FF965e67" Grid.Row="2" Grid.Column="3">
                                            <TextBlock Text="New Capacity" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>

                                        <ComboBox x:Name="cmbUnitType1" ItemsSource="{Binding SettingsUnitTypeList}" SelectedItem="{Binding SettingsSelectedUnitType,Mode=TwoWay}" Margin="0,5,0,20" Grid.Row="3" VerticalAlignment="Top" Style="{StaticResource ComboBoxStyleRightDropArrow}" Height="25" ItemContainerStyle="{StaticResource ComboBoxItemStyle}">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger  EventName="SelectionChanged">
                                                    <i:InvokeCommandAction Command="{Binding SettingsUnitTypeSelectionCommand}" CommandParameter="{Binding ElementName=cmbUnitType1}"  />
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </ComboBox>
                                        <ComboBox x:Name="cmbUnitName" ItemsSource="{Binding SettingsUnitNameList}" DisplayMemberPath="UnitName" IsEnabled="{Binding IsUnitNameEnabled}" SelectedItem="{Binding SettingsSelectedActivityUnit, Mode=TwoWay}" Margin="5,5,5,20" Grid.Row="3" Grid.Column="1"  VerticalAlignment="Top" Style="{StaticResource ComboBoxStyleRightDropArrow}" Height="25" ItemContainerStyle="{StaticResource ComboBoxItemStyle}">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger  EventName="SelectionChanged">
                                                    <i:InvokeCommandAction Command="{Binding UnitNameSelectionCommand}" CommandParameter="{Binding ElementName=cmbUnitName}"  />
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </ComboBox>
                                        <Grid Margin="0,5,0,20"  Grid.Row="3" Grid.Column="2"  HorizontalAlignment="Stretch" VerticalAlignment="Top">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <TextBox Name="txtRC" IsEnabled="False" Text="{Binding CurrentCapacity, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" Width="105" HorizontalAlignment="Left">
                                                <i:Interaction.Triggers>
                                                    <i:EventTrigger  EventName="Loaded">
                                                        <i:InvokeCommandAction  Command="{Binding RCTextBoxLoadCommand}" CommandParameter="{Binding ElementName=txtRC}" />
                                                    </i:EventTrigger>
                                                </i:Interaction.Triggers>
                                            </TextBox>
                                            <Border BorderThickness="0" Margin="0" Grid.Column="1" Background="#FF656565" BorderBrush="#99E9EEF4">
                                                <TextBlock Margin="5,0" Text="MBD/MMSCFD" TextWrapping="NoWrap" VerticalAlignment="Center"  HorizontalAlignment="Left" Style="{StaticResource SmallContentCapsStyle}"></TextBlock>
                                            </Border>
                                        </Grid>
                                        <Grid  Grid.Row="3" Grid.Column="3"  HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,5,0,20">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <TextBox Name="txtCapacity" Text="{Binding NewCapacity, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" Width="105" HorizontalAlignment="Left">
                                                <i:Interaction.Triggers>
                                                    <i:EventTrigger  EventName="Loaded">
                                                        <i:InvokeCommandAction  Command="{Binding CapacityTextBoxLoadCommand}" CommandParameter="{Binding ElementName=txtCapacity}" />
                                                    </i:EventTrigger>
                                                </i:Interaction.Triggers>
                                            </TextBox>
                                            <Border BorderThickness="0" Margin="0"  Grid.Column="1" Background="#FF656565" BorderBrush="#99E9EEF4">
                                                <TextBlock Margin="5,0" VerticalAlignment="Center" Text="MBD/MMSCFD" TextWrapping="NoWrap"  HorizontalAlignment="Left" Style="{StaticResource SmallContentCapsStyle}"></TextBlock>
                                            </Border>
                                        </Grid>
                                        <Path Data="M25.666672,37 L204.34454,37" Margin="0,10,0,0" Grid.Row="4" Grid.ColumnSpan="4" Stretch="Fill" StrokeThickness="1" UseLayoutRounding="False" VerticalAlignment="Top" Height="1" Stroke="{StaticResource LineColor}" />
                                    </Grid>

                                    <Grid Margin="0" Grid.Row="1">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="*"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Margin="0,35,0,5" Grid.ColumnSpan="3" TextWrapping="Wrap" Grid.Row="0" Text="Max Production Per Layer" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>


                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="0" Margin="0,0,0,0" Background="#FF965e67" >
                                            <TextBlock Text="Layer" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="1" Margin="5,0,5,0" Background="#FF965e67">
                                            <TextBlock Text="Current Max Prod" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Margin="0,0,0,0" Background="#FF965e67" Grid.Row="1" Grid.Column="2">
                                            <TextBlock Text="New Max Prod" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>

                                        <ComboBox x:Name="cmbMaxLayer" ItemsSource="{Binding LayerList}" DisplayMemberPath="LayerName" SelectedItem="{Binding SelectedMaxProdLayer, Mode=TwoWay}"  Margin="0,5,0,20" Grid.Row="2" VerticalAlignment="Top" Style="{StaticResource ComboBoxStyleRightDropArrow}" Height="25" ItemContainerStyle="{StaticResource ComboBoxItemStyle}">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger  EventName="SelectionChanged">
                                                    <i:InvokeCommandAction Command="{Binding UnitMaxProdLayerSelectionCommand}" CommandParameter="{Binding ElementName=cmbMaxLayer}"  />
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </ComboBox>
                                        <TextBox Margin="5,5,5,20" Grid.Row="2" Grid.Column="1"  Name="txtCurrentMaxProd" IsEnabled="False" Text="{Binding CurrentMaxProduction}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
                                        <TextBox Margin="0,5,0,20" Name="txtNewMaxProd" Grid.Row="2" Grid.Column="2" Text="{Binding NewMaxProduction, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" HorizontalAlignment="Stretch" VerticalAlignment="Center">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger  EventName="Loaded">
                                                    <i:InvokeCommandAction  Command="{Binding MaxProdTextBoxLoadCommand}" CommandParameter="{Binding ElementName=txtNewMaxProd}" />
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </TextBox>
                                        <Path Data="M25.666672,37 L204.34454,37" Margin="0,10,0,0" Grid.Row="3" Grid.ColumnSpan="4" Stretch="Fill" StrokeThickness="1" UseLayoutRounding="False" VerticalAlignment="Top" Height="1" Stroke="{StaticResource LineColor}" />
                                    </Grid>
                                    
                                    <Grid Margin="0" Grid.Row="2">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="*"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Margin="0,35,0,5" Grid.ColumnSpan="3" TextWrapping="Wrap" Grid.Row="0" Text="IPR" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>


                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="0" Margin="0,0,0,0" Background="#FF965e67" >
                                            <TextBlock Text="Layer" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="1" Margin="5,0,5,0" Background="#FF965e67">
                                            <TextBlock Text="Current IPR" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Margin="0,0,0,0" Background="#FF965e67" Grid.Row="1" Grid.Column="2">
                                            <TextBlock Text="New IPR" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>

                                        <ComboBox x:Name="cmbLayer" ItemsSource="{Binding LayerList}" DisplayMemberPath="LayerName" SelectedItem="{Binding SelectedLayer, Mode=TwoWay}"  Margin="0,5,0,20" Grid.Row="2" VerticalAlignment="Top" Style="{StaticResource ComboBoxStyleRightDropArrow}" Height="25" ItemContainerStyle="{StaticResource ComboBoxItemStyle}">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger  EventName="SelectionChanged">
                                                    <i:InvokeCommandAction Command="{Binding UnitLayerSelectionCommand}" CommandParameter="{Binding ElementName=cmbLayer}"  />
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </ComboBox>
                                        <TextBox Margin="5,5,5,20" Grid.Row="2" Grid.Column="1"  Name="txtCurrentIPR" IsEnabled="False" Text="{Binding CurrentIPR}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
                                        <TextBox Margin="0,5,0,20" Name="txtNewIPR" Grid.Row="2" Grid.Column="2" Text="{Binding NewIPR, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" HorizontalAlignment="Stretch" VerticalAlignment="Center">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger  EventName="Loaded">
                                                    <i:InvokeCommandAction  Command="{Binding IPRTextBoxLoadCommand}" CommandParameter="{Binding ElementName=txtNewIPR}" />
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </TextBox>
                                        <Path Data="M25.666672,37 L204.34454,37" Margin="0,10,0,0" Grid.Row="3" Grid.ColumnSpan="4" Stretch="Fill" StrokeThickness="1" UseLayoutRounding="False" VerticalAlignment="Top" Height="1" Stroke="{StaticResource LineColor}" />
                                    </Grid>

                                    <Grid Margin="0" Grid.Row="3">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="*"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Margin="0,35,0,5" Grid.ColumnSpan="3" TextWrapping="Wrap" Grid.Row="0" Text="UnPlanned Losses" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>


                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="0" Margin="0,0,0,0" Background="#FF965e67" >
                                            <TextBlock Text="Current Percentage" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="1" Margin="5,0,5,0" Background="#FF965e67">
                                            <TextBlock Text="New Percentage" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>

                                        <Grid Margin="0,5,0,20"  Grid.Row="2" Grid.Column="0"  HorizontalAlignment="Stretch" VerticalAlignment="Top">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <TextBox Name="txtCurrentPercentage" IsEnabled="False" Text="{Binding FieldData.CurrentUnplannedLossesPercentage, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" Width="105" HorizontalAlignment="Left">
                                               
                                            </TextBox>
                                            <Border BorderThickness="0" Margin="0" Grid.Column="1" Background="#FF965e67" BorderBrush="#99E9EEF4">
                                                <TextBlock Margin="5,0" Text="%" TextWrapping="NoWrap" VerticalAlignment="Center"  HorizontalAlignment="Center" Style="{StaticResource SmallContentCapsStyle}"></TextBlock>
                                            </Border>
                                        </Grid>

                                        <Grid Margin="5,5,5,20" Name="txtNewPercentage" Grid.Row="2" Grid.Column="1"   HorizontalAlignment="Stretch" VerticalAlignment="Top">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <TextBox Name="txtNewUnPlannedPercentage" Text="{Binding NewUnplannedLossesPercentage, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" Width="105" HorizontalAlignment="Left">
                                                <i:Interaction.Triggers>
                                                    <i:EventTrigger  EventName="Loaded">
                                                        <i:InvokeCommandAction  Command="{Binding LossPercentageTextBoxLoadCommand}" CommandParameter="{Binding ElementName=txtNewUnPlannedPercentage}" />
                                                    </i:EventTrigger>
                                                </i:Interaction.Triggers>
                                            </TextBox>
                                            <Border BorderThickness="0" Margin="0" Grid.Column="1" Background="#FF965e67" BorderBrush="#99E9EEF4">
                                                <TextBlock Margin="5,0" Text="%" TextWrapping="NoWrap" VerticalAlignment="Center"  HorizontalAlignment="Center" Style="{StaticResource SmallContentCapsStyle}"></TextBlock>
                                            </Border>
                                        </Grid>

                                        <Path Data="M25.666672,37 L204.34454,37" Margin="0,10,0,0" Grid.Row="3" Grid.ColumnSpan="4" Stretch="Fill" StrokeThickness="1" UseLayoutRounding="False" VerticalAlignment="Top" Height="1" Stroke="{StaticResource LineColor}" />
                                    </Grid>

                                    <Grid Margin="0" Grid.Row="4">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition Height="*"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Margin="0,35,0,5" Grid.ColumnSpan="3" TextWrapping="Wrap" Grid.Row="0" Text="Monitoring Losses" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>


                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="0" Margin="0,0,0,0" Background="#FF965e67" >
                                            <TextBlock Text="Current Percentage" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>
                                        <Border BorderThickness="0" Grid.Row="1" Grid.Column="1" Margin="5,0,5,0" Background="#FF965e67">
                                            <TextBlock Text="New Percentage" HorizontalAlignment="Center" Style="{StaticResource ContentStyle}"></TextBlock>
                                        </Border>

                                        <Grid Margin="0,5,5,20" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Top">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <TextBox Name="txtMonitoringCurrentPercentage" IsEnabled="False" Text="{Binding FieldData.CurrentMonitoringPercentage, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" Width="105" HorizontalAlignment="Left">
                                               
                                            </TextBox>
                                            <Border BorderThickness="0" Margin="0" Grid.Column="1" Background="#FF965e67" BorderBrush="#99E9EEF4">
                                                <TextBlock Margin="5,0" Text="%" TextWrapping="NoWrap" VerticalAlignment="Center"  HorizontalAlignment="Center" Style="{StaticResource SmallContentCapsStyle}"></TextBlock>
                                            </Border>
                                        </Grid>

                                        <Grid Margin="5,5,5,20" Grid.Row="2" Grid.Column="1"   HorizontalAlignment="Stretch" VerticalAlignment="Top">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                                <ColumnDefinition Width="*"></ColumnDefinition>
                                            </Grid.ColumnDefinitions>
                                            <TextBox Name="txtMonitoringNewPercentage" Text="{Binding NewMonitoringPercentage, Mode=TwoWay, ValidatesOnNotifyDataErrors=True,NotifyOnValidationError=True, UpdateSourceTrigger=Default}" MaxLength="100" Style="{StaticResource TextBoxStyle1}" TextWrapping="Wrap" Height="25" Width="105" HorizontalAlignment="Left">
                                                <i:Interaction.Triggers>
                                                    <i:EventTrigger  EventName="Loaded">
                                                        <i:InvokeCommandAction  Command="{Binding MonitoringTextBoxLoadCommand}" CommandParameter="{Binding ElementName=txtMonitoringNewPercentage}" />
                                                    </i:EventTrigger>
                                                </i:Interaction.Triggers>
                                            </TextBox>
                                            <Border BorderThickness="0" Margin="0" Grid.Column="1" Background="#FF965e67" BorderBrush="#99E9EEF4">
                                                <TextBlock Margin="5,0" Text="%" TextWrapping="NoWrap" VerticalAlignment="Center"  HorizontalAlignment="Center" Style="{StaticResource SmallContentCapsStyle}"></TextBlock>
                                            </Border>
                                        </Grid>
                                    </Grid>

                                </Grid>
                                <Grid Margin="25,15,10,0" Grid.Row="0" Grid.Column="1">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="*"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <TextBlock Margin="0" TextWrapping="Wrap" Text="OCCP Radials Flowing" TextDecorations="Underline" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource ContentStyle}"/>
                                    <Grid Grid.Row="1" Margin="0,5">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Margin="0,5,0,5" Grid.Column="0" TextWrapping="Wrap" Text="Radial" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>
                                        <TextBlock Margin="0,5,0,5" Grid.Column="1" TextWrapping="Wrap" Text="USOSSP" VerticalAlignment="Center" HorizontalAlignment="Center" Style="{StaticResource SmallContentStyle}"/>
                                        <TextBlock Margin="0,5,0,5" Grid.Column="2" TextWrapping="Wrap" Text="ByPass Oil line" VerticalAlignment="Center" HorizontalAlignment="Center" Style="{StaticResource SmallContentStyle}"/>
                                    </Grid>
                                    <ListBox Margin="0,15,0,0" Background="#FF2C303C" BorderBrush="{x:Null}" ItemsSource="{Binding OccpRadialFlowList}" ItemContainerStyle="{StaticResource ScenarioListBoxItemStyle}" Grid.Row="2">
                                        <ListBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid Margin="0">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*"></ColumnDefinition>
                                                        <ColumnDefinition Width="*"></ColumnDefinition>
                                                        <ColumnDefinition Width="*"></ColumnDefinition>
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock Margin="0,5,0,5" Grid.Column="0" TextWrapping="Wrap" Text="{Binding UnitName}" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource SmallContentStyle}"/>
                                                    <RadioButton Name="chkUSOSSP" Grid.Column="1" Tag="{Binding }" HorizontalAlignment="Center" GroupName="{Binding GroupId}" IsChecked="{Binding USOSSPItemChecked,Mode=TwoWay}" Command="{Binding Source={StaticResource ServiceLocator}, Path=ImportVM.OCCPRadialSwitchCheckedCommand}" CommandParameter="{Binding ElementName=chkUSOSSP}" Margin="3,0,0,0" />
                                                    <RadioButton Name="chkBypass" Grid.Column="2" Tag="{Binding }" HorizontalAlignment="Center" GroupName="{Binding GroupId}" IsChecked="{Binding ByPassItemChecked,Mode=TwoWay}" Command="{Binding Source={StaticResource ServiceLocator}, Path=ImportVM.OCCPRadialSwitchCheckedCommand}" CommandParameter="{Binding ElementName=chkBypass}" Margin="3,0,0,0" />
                                                </Grid>
                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListBox>

                                </Grid>
                            </Grid>
                        </Border>


                    </Grid>
                </Grid>
                <Border Margin="0,20" Grid.Row="2" BorderThickness="0" BorderBrush="{StaticResource PopupBorder}" Background="#FF2C303C">
                    <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal" d:LayoutOverrides="Width" Margin="0,20,10,0" HorizontalAlignment="Right" >
                        <Button Name="btnSave" Cursor="Hand" Command="{Binding Path=SettingsSubmitCommand}" CommandParameter="{Binding ElementName=btnSave}" Content="Save" Margin="0,0,30,0" Width="130" Height="28" Style="{StaticResource OverlapButtonStyle}" Grid.Column="2" VerticalAlignment="Center" />
                        <Button Name="btnCancel" Cursor="Hand" Command="{Binding Path=SettingsCancelCommand}" CommandParameter="{Binding ElementName=btnCancel}" Content="Cancel" Margin="0,0,30,0" Width="130" Height="28" Style="{StaticResource OverlapButtonStyle}" Grid.Column="2" VerticalAlignment="Center" />
                    </StackPanel>
                </Border>
            </Grid>
        </Border>
    </Grid>
</UserControl>
